<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    .fade-enter-active, .fade-leave-active {
      transition: opacity 5s;
    }
    .fade-enter, .fade-leave-to {
      opacity: 0;
    }
  </style>
  <link href="https://cdn.bootcss.com/animate.css/3.7.2/animate.min.css" rel="stylesheet">
</head>
<body>

  <div id="root">
    <button @click="show = !show">切换</button>

    <transition name="fade">
      <p v-if="show">大家好</p>
    </transition>

    <button @click="seen = !seen">toggle</button>
    <transition
      enter-active-class="animated lightSpeedIn"
      leave-active-class="animated lightSpeedOut"
    >
      <p v-if="seen" style="width: 100px;">自定义类名</p>
    </transition>
  </div>
  
  <script src="./libs/vue.js"></script>
  <script>
    new Vue({
      el: '#root',
      data: {
        show: true,
        seen: true
      }
    })
  </script>
</body>
</html>